<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /*
            以下这种异步回调函数嵌套异步回调函数的写法被称为回调地狱
            回调地狱耦合度过高,不方便维护和阅读
        */
        console.log('请求A的数据');
        setTimeout(() => {
            console.log('A的数据获取成功');
            console.log('请求B的数据');
            setTimeout(() => {
            console.log('B的数据获取成功');
            console.log('请求C的数据');
            setTimeout(() => {
            console.log('C的数据获取成功');
            
        }, 3000);
        }, 3000);
        }, 3000);
    </script>
</body>
</html>